package com.wolfpire.workflow.em;

/**
 * 任务审核
 * @author liushx
 *
 */
public enum OperateType {

	START("0", "start"),//开始流程
	PASS("1", "审核通过"),//
	BACK("2", "驳回"),//、返回上一步
	NEXT("3", "下一步"),//
	SAVE("4", "暂存"),
	INVALID("5", "作废"),
	REFUSE("6", "拒绝");//
	
	private String index;  
	private String name;  
		
    private OperateType(String index, String name) {   
        this.name = name;   
        this.index = index;   
    }  
    
    public static String getNameByIndex(String index){
    	String name = "";
    	for(OperateType op : OperateType.values()){  
            if(index.equals(op.getIndex())){
            	name = op.getName();
            }
        }  
    	return name;
    }
    
    public String getName() {   
        return name;   
    }  
    
    public String getIndex() {   
        return index;   
    }

    public String toString() {
   
    	return getName();
    }
}
